<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let p = {
      name: '张三',
      age: 22,
      class: 2007,
      get info() {
        return this.name + ' ' + this.age + ' ' + this.class
      }
    }
    let receive = {
      age: 10,
      name: '李四',
      sex: '男'
    }
    let v1 = Reflect.get(p, 'name')
    let v2 = Reflect.set(p, 'name', '王五')
    let v3 = Reflect.get(p, 'name')
    console.log(v1);
    console.log(v3);
    let v4 = Reflect.get(p, 'info', receive)//改变this指向
    let v5 = Reflect.get(p, 'info')
    console.log(v4);
    console.log(v5);
  </script>
</body>

</html>